﻿using UnityEngine;

namespace TC
{
    public class CreateObject : FunctionNode
    {
        public ValueInput<string> type;
        public ValueInput<int> ID;
        public ValueInput<Vector3> position;
        public ValueInput<Vector3> rotation;

        public override void OnCreate()
        {
            base.OnCreate();

            type = this.AddValueInPort<string>("type");
            ID = this.AddValueInPort<int>("ID");
            position = this.AddValueInPort<Vector3>("position");
            rotation = this.AddValueInPort<Vector3>("rotation");
        }

        public override void Execute(Dispatcher chain)
        {
            base.Execute(chain);

            Debug.Log("CreateObject type: " + type.Value + ", ID: " + ID.Value);

            chain.Call(flowOut);
        }
    }
}
